From: Matthias Klose Date: Tue, 20 Jan 2026 10:45:10 +0000 (+0100) Subject: lib-argparse X-Git-Tag: archive/raspbian/3.9.2-1+rpi1+deb11u6~1^2~73 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com//%22mailto:ematirov%40gmail.com/%22/%22http:/www.example.com/%22mailto:ematirov%40gmail.com/%22?a=commitdiff_plain;h=4d9ded5e0345ee4c83742444c133370ec9182430;p=python3.9.git lib-argparse # DP: argparse.py: Make the gettext import conditional # DP: argparse.py: Make the gettext import conditional Gbp-Pq: Name lib-argparse.diff --- diff --git a/Lib/argparse.py b/Lib/argparse.py index 2fb1da5..840d3b1 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -89,7 +89,16 @@ import os as _os import re as _re import sys as _sys -from gettext import gettext as _, ngettext +try: + from gettext import gettext as _, ngettext +except ImportError: + def _(message): + return message + def ngettext(singular,plural,n): + if n == 1: + return singular + else: + return plural SUPPRESS = '==SUPPRESS=='